﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NPipeline
{

    public enum PipelineState
    {
        STOPPED,
        STARTED,
        RUNNING,
        STOP_REQUESTED,
        FINISHED,
        ERROR
    }


    public interface IStageDriver
    {


        void Start();
        void Finish();

        /// <summary>
        /// Returns the Feeder used to feed objects to the managed stage for
        /// processing
        /// </summary>
        /// <returns></returns>
        IFeeder Feeder { get; }
        
        /// <summary>
        /// returns the Stage being run by this StageDriver
        /// </summary>
        IStage Stage { get; }
        /// <summary>
        /// returns a list of unrecoverable errors
        /// </summary>
        List<Exception> FatalErrors { get; }

        /// <summary>
        /// returns the list of errors that occured while processing data
        /// objects, along with the objects the objects that were being processed
        /// when the errors where generated
        /// </summary>
        List<ProcessingException> ProcessingExceptions { get; }

        // THE DRIVER IS NOT EXPOSED -- so might be USELESS
        PipelineState CurrentState { get; }


    }
}
